Optimal. Leaf size=185 \[ \frac{3 \left (2 a^2+b^2\right ) \tan ^2(c+d x)}{2 b^5 d}-\frac{a \left (10 a^2+9 b^2\right ) \tan (c+d x)}{b^6 d}+\frac{6 a \left (a^2+b^2\right )^2}{b^7 d (a+b \tan (c+d x))}-\frac{\left (a^2+b^2\right )^3}{2 b^7 d (a+b \tan (c+d x))^2}+\frac{3 \left (a^2+b^2\right ) \left (5 a^2+b^2\right ) \log (a+b \tan (c+d x))}{b^7 d}-\frac{a \tan ^3(c+d x)}{b^4 d}+\frac{\tan ^4(c+d x)}{4 b^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.155936, antiderivative size = 185, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3506, 697} \[ \frac{3 \left (2 a^2+b^2\right ) \tan ^2(c+d x)}{2 b^5 d}-\frac{a \left (10 a^2+9 b^2\right ) \tan (c+d x)}{b^6 d}+\frac{6 a \left (a^2+b^2\right )^2}{b^7 d (a+b \tan (c+d x))}-\frac{\left (a^2+b^2\right )^3}{2 b^7 d (a+b \tan (c+d x))^2}+\frac{3 \left (a^2+b^2\right ) \left (5 a^2+b^2\right ) \log (a+b \tan (c+d x))}{b^7 d}-\frac{a \tan ^3(c+d x)}{b^4 d}+\frac{\tan ^4(c+d x)}{4 b^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3506
Rule 697
Rubi steps
\begin{align*} \int \frac{\sec ^8(c+d x)}{(a+b \tan (c+d x))^3} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (1+\frac{x^2}{b^2}\right )^3}{(a+x)^3} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{-10 a^3-9 a b^2}{b^6}+\frac{3 \left (2 a^2+b^2\right ) x}{b^6}-\frac{3 a x^2}{b^6}+\frac{x^3}{b^6}+\frac{\left (a^2+b^2\right )^3}{b^6 (a+x)^3}-\frac{6 a \left (a^2+b^2\right )^2}{b^6 (a+x)^2}+\frac{3 \left (5 a^4+6 a^2 b^2+b^4\right )}{b^6 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{3 \left (a^2+b^2\right ) \left (5 a^2+b^2\right ) \log (a+b \tan (c+d x))}{b^7 d}-\frac{a \left (10 a^2+9 b^2\right ) \tan (c+d x)}{b^6 d}+\frac{3 \left (2 a^2+b^2\right ) \tan ^2(c+d x)}{2 b^5 d}-\frac{a \tan ^3(c+d x)}{b^4 d}+\frac{\tan ^4(c+d x)}{4 b^3 d}-\frac{\left (a^2+b^2\right )^3}{2 b^7 d (a+b \tan (c+d x))^2}+\frac{6 a \left (a^2+b^2\right )^2}{b^7 d (a+b \tan (c+d x))}\\ \end{align*}
Mathematica [A] time = 1.33094, size = 272, normalized size = 1.47 \[ \frac{4 a^2 b^4 \tan ^4(c+d x)-20 a b^3 \left (a^2+b^2\right ) \tan ^3(c+d x)+4 b^2 \tan ^2(c+d x) \left (3 \left (6 a^2 b^2+5 a^4+b^4\right ) \log (a+b \tan (c+d x))-10 a^2 b^2-13 a^4\right )+2 \left (a^2+b^2\right ) \left (6 a^2 \left (5 a^2+b^2\right ) \log (a+b \tan (c+d x))+16 a^2 b^2+19 a^4-3 b^4\right )+4 a b \tan (c+d x) \left (6 \left (6 a^2 b^2+5 a^4+b^4\right ) \log (a+b \tan (c+d x))+17 a^2 b^2+4 a^4+11 b^4\right )+b^4 \sec ^4(c+d x) \left (a^2-2 a b \tan (c+d x)+3 b^2\right )+b^6 \sec ^6(c+d x)}{4 b^7 d (a+b \tan (c+d x))^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.128, size = 321, normalized size = 1.7 \begin{align*}{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{4}}{4\,{b}^{3}d}}-{\frac{a \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{{b}^{4}d}}+3\,{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{2}{a}^{2}}{d{b}^{5}}}+{\frac{3\, \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{2\,{b}^{3}d}}-10\,{\frac{{a}^{3}\tan \left ( dx+c \right ) }{d{b}^{6}}}-9\,{\frac{a\tan \left ( dx+c \right ) }{{b}^{4}d}}-{\frac{{a}^{6}}{2\,d{b}^{7} \left ( a+b\tan \left ( dx+c \right ) \right ) ^{2}}}-{\frac{3\,{a}^{4}}{2\,d{b}^{5} \left ( a+b\tan \left ( dx+c \right ) \right ) ^{2}}}-{\frac{3\,{a}^{2}}{2\,{b}^{3}d \left ( a+b\tan \left ( dx+c \right ) \right ) ^{2}}}-{\frac{1}{2\,bd \left ( a+b\tan \left ( dx+c \right ) \right ) ^{2}}}+6\,{\frac{{a}^{5}}{d{b}^{7} \left ( a+b\tan \left ( dx+c \right ) \right ) }}+12\,{\frac{{a}^{3}}{d{b}^{5} \left ( a+b\tan \left ( dx+c \right ) \right ) }}+6\,{\frac{a}{{b}^{3}d \left ( a+b\tan \left ( dx+c \right ) \right ) }}+15\,{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ){a}^{4}}{d{b}^{7}}}+18\,{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ){a}^{2}}{d{b}^{5}}}+3\,{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{{b}^{3}d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.03506, size = 270, normalized size = 1.46 \begin{align*} \frac{\frac{2 \,{\left (11 \, a^{6} + 21 \, a^{4} b^{2} + 9 \, a^{2} b^{4} - b^{6} + 12 \,{\left (a^{5} b + 2 \, a^{3} b^{3} + a b^{5}\right )} \tan \left (d x + c\right )\right )}}{b^{9} \tan \left (d x + c\right )^{2} + 2 \, a b^{8} \tan \left (d x + c\right ) + a^{2} b^{7}} + \frac{b^{3} \tan \left (d x + c\right )^{4} - 4 \, a b^{2} \tan \left (d x + c\right )^{3} + 6 \,{\left (2 \, a^{2} b + b^{3}\right )} \tan \left (d x + c\right )^{2} - 4 \,{\left (10 \, a^{3} + 9 \, a b^{2}\right )} \tan \left (d x + c\right )}{b^{6}} + \frac{12 \,{\left (5 \, a^{4} + 6 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{7}}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.5378, size = 1076, normalized size = 5.82 \begin{align*} \frac{8 \,{\left (15 \, a^{4} b^{2} + 13 \, a^{2} b^{4}\right )} \cos \left (d x + c\right )^{6} + b^{6} - 2 \,{\left (45 \, a^{4} b^{2} + 44 \, a^{2} b^{4} + 3 \, b^{6}\right )} \cos \left (d x + c\right )^{4} +{\left (5 \, a^{2} b^{4} + 3 \, b^{6}\right )} \cos \left (d x + c\right )^{2} + 6 \,{\left ({\left (5 \, a^{6} + a^{4} b^{2} - 5 \, a^{2} b^{4} - b^{6}\right )} \cos \left (d x + c\right )^{6} + 2 \,{\left (5 \, a^{5} b + 6 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )^{5} \sin \left (d x + c\right ) +{\left (5 \, a^{4} b^{2} + 6 \, a^{2} b^{4} + b^{6}\right )} \cos \left (d x + c\right )^{4}\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 6 \,{\left ({\left (5 \, a^{6} + a^{4} b^{2} - 5 \, a^{2} b^{4} - b^{6}\right )} \cos \left (d x + c\right )^{6} + 2 \,{\left (5 \, a^{5} b + 6 \, a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )^{5} \sin \left (d x + c\right ) +{\left (5 \, a^{4} b^{2} + 6 \, a^{2} b^{4} + b^{6}\right )} \cos \left (d x + c\right )^{4}\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) - 2 \,{\left (a b^{5} \cos \left (d x + c\right ) + 2 \,{\left (15 \, a^{5} b - 2 \, a^{3} b^{3} - 13 \, a b^{5}\right )} \cos \left (d x + c\right )^{5} + 10 \,{\left (a^{3} b^{3} + a b^{5}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{4 \,{\left (2 \, a b^{8} d \cos \left (d x + c\right )^{5} \sin \left (d x + c\right ) + b^{9} d \cos \left (d x + c\right )^{4} +{\left (a^{2} b^{7} - b^{9}\right )} d \cos \left (d x + c\right )^{6}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.43227, size = 328, normalized size = 1.77 \begin{align*} \frac{\frac{12 \,{\left (5 \, a^{4} + 6 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{7}} - \frac{2 \,{\left (45 \, a^{4} b^{2} \tan \left (d x + c\right )^{2} + 54 \, a^{2} b^{4} \tan \left (d x + c\right )^{2} + 9 \, b^{6} \tan \left (d x + c\right )^{2} + 78 \, a^{5} b \tan \left (d x + c\right ) + 84 \, a^{3} b^{3} \tan \left (d x + c\right ) + 6 \, a b^{5} \tan \left (d x + c\right ) + 34 \, a^{6} + 33 \, a^{4} b^{2} + b^{6}\right )}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{2} b^{7}} + \frac{b^{9} \tan \left (d x + c\right )^{4} - 4 \, a b^{8} \tan \left (d x + c\right )^{3} + 12 \, a^{2} b^{7} \tan \left (d x + c\right )^{2} + 6 \, b^{9} \tan \left (d x + c\right )^{2} - 40 \, a^{3} b^{6} \tan \left (d x + c\right ) - 36 \, a b^{8} \tan \left (d x + c\right )}{b^{12}}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]